home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre2.z / postgre2 / ref / unix / pagedoc < prev    next >
Encoding:
Text File  |  1992-08-27  |  2.2 KB  |  87 lines

  1. .\" $Header: /private/postgres/ref/unix/RCS/pagedoc,v 1.2 1992/08/18 18:14:52 mao Exp $
  2. .SP PAGEDOC UNIX 8/18/92
  3. .uh NAME
  4. .lp
  5. pagedoc \- \*(PP page doctor
  6. .uh SYNOPSIS
  7. .ip
  8. .b pagedoc
  9. [
  10. .i "\-h|b|r"
  11. ] [
  12. .i "\-d level"
  13. ]
  14. .i filename
  15. .uh DESCRIPTION
  16. .lp
  17. The
  18. .b pagedoc
  19. program understands the layout of data on POSTGRES pages,
  20. and can be used to view contents of relations in case a database
  21. gets corrupted.
  22. Contents are printed to standard output,
  23. and probable errors are flagged with four asterisks (``****'')
  24. and a description of the problem.
  25. .lp
  26. Several levels of detail are available.
  27. Level zero prints only a single summary line per data page in
  28. the relation.
  29. The summary line includes the number of items on the page,
  30. some allocation information,
  31. and whatever additional detail is appropriate for the relation
  32. type being examined.
  33. Level one also prints a single summary line for each tuple that
  34. appears on each page.
  35. The tuple summary includes the tuple's position on the page,
  36. its length,
  37. and some allocation information.
  38. Level two (or higher)
  39. prints all of the information printed by level one,
  40. and prints tuple headers for every tuple on the page.
  41. The header information displayed depends on the type of relation
  42. being viewed;
  43. either HeapTuple or IndexTuple structure entries are possible.
  44. .lp
  45. If the relation's contents are badly damaged,
  46. then only level zero is likely to work.
  47. Finer levels of detail assume that more page structure is correct,
  48. and so are more sensitive to corruption.
  49. .uh ARGUMENTS
  50. .ip "\fI\-h|b|r\fP"
  51. The type of the relation.
  52. Type
  53. .i h
  54. is heap,
  55. .i b
  56. is btree,
  57. and 
  58. .i r
  59. is rtree.
  60. The default is
  61. .i h .
  62. .ip "\fI\-d level\fP"
  63. The detail level to use in displaying pages.
  64. .ip \fIfilename\fP
  65. The name of the file containing the relation.
  66. .uh EXAMPLES
  67. .lp
  68. To print page and line pointer summaries and tuple headers for
  69. a btree index named
  70. .i pg_typeidind ,
  71. .(b
  72. pagedoc \-b \-d2 pg_typeidind
  73. .)b
  74. .lp
  75. To show the default (level zero) summary of a heap relation named
  76. .i pg_user ,
  77. .(b
  78. pagedoc pg_user
  79. .)b
  80. .uh BUGS
  81. .lp
  82. Finer levels of detail produce a lot of output.
  83. .lp
  84. There's no way to skip forward to a page that shows some corruption.
  85. .lp
  86. You can only examine contents, you can't actually fix them.
  87.